from flask import Flask, render_template

app = Flask(__name__)


@app.route("/")
def index():
    # 往模板中传入的数据
    my_str = "Hello Word"
    my_int = 10
    my_array = [3, 4, 2, 1, 7, 9]
    my_dict = {"name": "xiaoming", "age": 18}
    return render_template(
        "hello.html", my_str=my_str, my_int=my_int, my_array=my_array, my_dict=my_dict
    )


if __name__ == "__main__":
    any_ip = "0.0.0.0"
    http_port = 8088
    app.run(any_ip, http_port)
